package com.platform.consumer.function;


import com.platform.common.interfaces.IDemoFunction;
import org.apache.dubbo.config.annotation.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 普通接口调用
 */
@RestController
public class ConsumerDemoFunction {

    private static final Logger logger = LoggerFactory.getLogger(ConsumerDemoFunction.class);

    @Reference
    private IDemoFunction demoFunction;


    @RequestMapping("/consumerTest")
    public String consumerTest(String name){
        String str = demoFunction.demoFunction(name);
        logger.info(str);
        return str;
    }

}
